<?php
namespace App\Http\Controllers\Api;
use App\Lib\QiNiuAdapter;
use Illuminate\Support\Facades\Storage;

class TestController {

    public function qiniu() {
//        echo (new QiNiuAdapter())->getToken();exit;
        try{
            $filename = date('YmdHis'). rand(0, 100000) . ".mp4";
//            Storage::disk('qiniu')->write($filename, public_path('logo/20200501/1588301635_5eab8f433f002.jpg'));
            $result = Storage::disk('qiniu')->write($filename, public_path('aaa.mp4'));

        }catch (\Exception $e) {
            dd($e->getMessage());
        }
    }
}